﻿@model List<Order>

@{
    ViewData["Title"] = "Index";
    Layout = "_Layout";
}

<div class="container-fluid">
    <div class="row cm-fix-height">
        <div class="col-sm-12">
            <div class="panel panel-danger">
                <div class="panel-body">
                    <h3>订单基本信息管理</h3>
                     <div class="col-sm-4">
                        <form class="form-horizontal form-bordered" method="POST" action="@Url.Action("SearchId")">
                            <div class="input-group input-search">
                                <input type="text" class="form-control" name="name" placeholder="请输入Uid...">
                                <span class="input-group-btn">
                                    <button class="btn btn-default" type="submit"><i class="fa fa-search"></i></button>
                                </span>
                            </div>
                        </form>
                    </div>

                    @if (Model != null)
                    {
                        <table class="table table-hover" style="margin-bottom:0">

                            <thead>
                                <tr>
                                    <th>#</th>
                                    <th>订单号</th>
                                    <th>车次</th>
                                    <th>用户身份证号</th>
                                    <th>删除</th>
                                    <th>修改</th>
                                </tr>
                            </thead>
                            
                            @for (var item=0;item<Model.Count;item++)
                            {
                                <tbody>
                                    <tr>
                                        <th scope="row">@item</th>
                                        <td>@Model[item].Oid</td>
                                        <td>@Model[item].Tid</td>
                                        <td>@Model[item].Uid</td>
                                        <td>
                                            <a href="@Url.Action("Delete")?Id=@Model[item].Oid" >
                                                删除
                                            </a>
                                        </td>
                                </tbody>
                            }
                            <tr>
                                <th colsapn="4" style="text-align:center;">
                                    <input type="button" class="btn btn-default" onclick="window.location.href='@Url.Action("Create")'" value="新增" />
                                    <input type="button" class="btn btn-default" onclick="javascript: window.history.back();" value="返回" />
                                </th>
                            </tr>
                        </table>
                    }
                </div>
            </div>
        </div>
    </div>
</div>